<template>
    <div>
<NavBar :title="title"></NavBar>
<van-search
  v-model="value"
  show-action
  label="地址"
  placeholder="请输入搜索关键词"
  @search="onSearch"
>
  <template #action>
    <div @click="onClickButton">搜索</div>
  </template>
</van-search>

    </div>
</template>

<script setup>
import NavBar from '@/components/NavBar.vue';
const title='搜索'
import { ref } from 'vue';
import { showToast } from 'vant';
const value = ref('');
    const onSearch = (val) => showToast(val);
    const onClickButton = () => showToast(value.value);
</script>

<style lang="scss" scoped>

</style>